﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MapService;
using System.ServiceModel;

namespace HostMap
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceHost host = new ServiceHost(typeof(Service1));
            host.Open();
            Console.WriteLine("Service is running in following address:\n");
            foreach (var endpoint in host.Description.Endpoints)
                Console.WriteLine("-{0}", endpoint.Address);
            Console.WriteLine();
            Console.WriteLine("Press enter to shutdown the host:");
            Console.ReadLine();
            host.Close();
        }
    }
}
